-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix:accept CurrentPlayheadPosition with 0 value #638
fix:accept CurrentPlayheadPosition with 0 value #638
Conversation
@rmi22186 @alexs-mparticle - this needs more work as it seems my fix affected the logPlayheadPosition function indirectly as well as in the process of doing so found another bug on the same function without my fix implemented Edit: this has been updated and now everything working as expected |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM. The only issue being the failing tests when it's not node v14. There's got to be an issue with the dependencies, but I don't have time to sort that out right now. I can look more next week.
src/session.ts
Outdated
if (options?.currentPlayheadPosition !== undefined) { | ||
this.currentPlayheadPosition = options?.currentPlayheadPosition; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, since this is TS, i think you can do ?? instead of ||.
https://stackoverflow.com/questions/61480993/when-should-i-use-nullish-coalescing-vs-logical-or
Try that and see if your tests pass. Yay ts!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rmi22186 - tested the suggested change and confirmed its working and pushed the new code, thanks!
Summary
Testing Plan
Reference Issue (For mParticle employees only. Ignore if you are an outside contributor)